package com.rgs.rabbitmq.consumer;

import com.rgs.rabbitmq.config.RabbitMQConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @program: com-rgs-parent
 * @description: Exchange交换机Fanout模式的监听
 * @author: Mr.Ren
 * @create: 2023-01-06 13:45
 **/
@Component
@RabbitListener(queues = {RabbitMQConfig.RABBITMQ_FANOUT_QUEUE_A})
public class FanoutRabbitConsumerA {


    @RabbitHandler
    public void process(Map map) {
        System.out.println("消费者FanoutRabbitConsumerA成功消费到消息：" + map.toString());
    }
}
